home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / glibmm-2.4 / glibmm / interface.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-04-20  |  2.1 KB  |  73 lines

  1. // -*- c++ -*-
  2. #ifndef _GLIBMM_INTERFACE_H
  3. #define _GLIBMM_INTERFACE_H
  4.  
  5. /* $Id: interface.h,v 1.1.1.1 2003/01/07 16:58:46 murrayc Exp $ */
  6.  
  7. /* Copyright 2002 The gtkmm Development Team
  8.  *
  9.  * This library is free software; you can redistribute it and/or
  10.  * modify it under the terms of the GNU Library General Public
  11.  * License as published by the Free Software Foundation; either
  12.  * version 2 of the License, or (at your option) any later version.
  13.  *
  14.  * This library is distributed in the hope that it will be useful,
  15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17.  * Library General Public License for more details.
  18.  *
  19.  * You should have received a copy of the GNU Library General Public
  20.  * License along with this library; if not, write to the Free
  21.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  */
  23.  
  24. #include <glibmm/object.h>
  25.  
  26.  
  27. namespace Glib
  28. {
  29.  
  30. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  31. class Interface_Class;
  32. #endif
  33.  
  34. // There is no base GInterface struct in Glib, though there is G_TYPE_INTERFACE enum value.
  35. class Interface : virtual public Glib::ObjectBase
  36. {
  37. public:
  38. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  39.   typedef Interface       CppObjectType;
  40.   typedef Interface_Class CppClassType;
  41.   typedef GTypeInterface  BaseClassType;
  42. #endif /* DOXYGEN_SHOULD_SKIP_THIS */
  43.  
  44.   explicit Interface(const Glib::Interface_Class& interface_class);
  45.   explicit Interface(GObject* castitem);
  46.   virtual ~Interface();
  47.  
  48.   //void add_interface(GType gtype_implementer);
  49.  
  50.   // Hook for translating API
  51.   //static Glib::Interface* wrap_new(GTypeInterface*);
  52.  
  53. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  54.   static GType get_type()      G_GNUC_CONST;
  55.   static GType get_base_type() G_GNUC_CONST;
  56. #endif
  57.  
  58.   inline GObject* gobj()             { return gobject_; }
  59.   inline const GObject* gobj() const { return gobject_; }
  60.  
  61. private:
  62.   // noncopyable
  63.   Interface(const Interface&);
  64.   Interface& operator=(const Interface&);
  65. };
  66.  
  67. RefPtr<ObjectBase> wrap_interface(GObject* object, bool take_copy = false);
  68.  
  69. } // namespace Glib
  70.  
  71. #endif /* _GLIBMM_INTERFACE_H */
  72.  
  73.